begin
  require 'active_record'
rescue LoadError
  $stderr.puts "Missing activerecord gem. Please add it to Gemfile and run 'bundle install'."
  exit 1
end

module Skit
  module Health
    module Check
      class ActiveRecord
        class << self
          def check!
            ::ActiveRecord::Base.connection_pool.with_connection do |connection|
              connection.execute('select 1 as skit_health').first
            end
          end
        end
      end
    end
  end
end
